  static const char* fill_frag_shader_0 =
      "#ifdef GL_ES\n"
      "#if defined(GL_FRAGMENT_PRECISION_HIGH) || defined(NVGP_GL3)\n"
      " precision highp float;\n"
      "#else\n"
      " precision mediump float;\n"
      "#endif\n"
      "#endif\n"
      "#ifdef NVGP_GL3\n"
      "#ifdef USE_UNIFORMBUFFER\n"
      " layout(std140) uniform frag {\n"
      "   mat3 scissorMat;\n"
      "   mat3 paintMat;\n"
      "   vec4 innerCol;\n"
      "   vec4 outerCol;\n"
      "   vec2 scissorExt;\n"
      "   vec2 scissorScale;\n"
      "   vec2 extent;\n"
      "   float radius;\n"
      "   float feather;\n"
      "   float strokeMult;\n"
      "   float strokeThr;\n"
      "   vec2 draw_info;\n"
      " };\n"
      "#else\n"  // NVGP_GL3 && !USE_UNIFORMBUFFER
      " uniform vec4 frag[UNIFORMARRAY_SIZE];\n"
      "#endif\n"
      " uniform sampler2D tex;\n"
      " in vec2 ftcoord;\n"
      " in vec2 fpos;\n"
      " out vec4 outColor;\n"
      "#else\n"  // !NVGP_GL3
      " uniform vec4 frag[UNIFORMARRAY_SIZE];\n"
      " uniform sampler2D tex;\n"
      " varying vec2 ftcoord;\n"
      " varying vec2 fpos;\n"
      "#endif\n"
      "#ifndef USE_UNIFORMBUFFER\n"
      " #define scissorMat mat3(frag[0].xyz, frag[1].xyz, frag[2].xyz)\n"
      " #define paintMat mat3(frag[3].xyz, frag[4].xyz, frag[5].xyz)\n"
      " #define innerCol frag[6]\n"
      " #define outerCol frag[7]\n"
      " #define scissorExt frag[8].xy\n"
      " #define scissorScale frag[8].zw\n"
      " #define extent frag[9].xy\n"
      " #define radius frag[9].z\n"
      " #define feather frag[9].w\n"
      " #define strokeMult frag[10].x\n"
      " #define strokeThr frag[10].y\n"
      " #define draw_info frag[10].zw\n"
      "#endif\n"
      "\n"
      "float sdroundrect(vec2 pt, vec2 ext, float rad) {\n"
      " vec2 ext2 = ext - vec2(rad,rad);\n"
      " vec2 d = abs(pt) - ext2;\n"
      " return min(max(d.x,d.y),0.0) + length(max(d,0.0)) - rad;\n"
      "}\n"
      "\n"
      "// Scissoring\n"
      "float scissorMask(vec2 p) {\n"
      " vec2 sc = (abs((scissorMat * vec3(p,1.0)).xy) - scissorExt);\n"
      " sc = vec2(0.5,0.5) - sc * scissorScale;\n"
      " return clamp(sc.x,0.0,1.0) * clamp(sc.y,0.0,1.0);\n"
      "}\n"
      "// Stroke - from [0..1] to clipped pyramid, where the slope is 1px.\n"
      "float strokeMask() {\n"
      " return min(1.0, (1.0-abs(ftcoord.x*2.0-1.0))*strokeMult) * min(1.0, ftcoord.y);\n"
      "}\n"
      "// fill_frag_shader_0 \n"
      "void main(void) {\n"
      " vec4 result;\n"
      " float strokeAlpha;\n"
      " if(draw_info.x == 1.0) {\n"
      "   result = vec4(1,1,1,1);\n"
      " } else {\n"
      "   strokeAlpha = strokeMask();\n"
      // "   if(strokeAlpha < strokeThr) discard;\n"
      "   // Calculate gradient color using box gradient\n"
      "   vec2 pt = (paintMat * vec3(fpos,1.0)).xy;\n"
      "   float d = clamp((sdroundrect(pt, extent, radius) + feather*0.5) / feather, 0.0, 1.0);\n"
      "   vec4 color = mix(innerCol,outerCol,d);\n"
      "   // Combine alpha\n"
      "   float scissor = scissorMask(fpos);\n"
      "   color *= strokeAlpha * scissor;\n"
      "   result = color;\n"
      " }\n"
      "#ifdef NVGP_GL3\n"
      " outColor = result;\n"
      "#else\n"
      " gl_FragColor = result;\n"
      "#endif\n"
      "}\n";
